<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateProfitSharingListTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('profit_sharing_list', function (Blueprint $table) {
            $table->id();
            $table->string('channel','64');
            $table->string('sub_mchid','128');
            $table->string('sub_appid','128');
            $table->string('trans_id','64');
            $table->string('profit_sharing_order_id','128');
            $table->text('accounts');
            $table->tinyInteger('status')->default(1);
            $table->string('ps_time','32')->default('');
            $table->text('ps_msg')->nullable();
            $table->string('finish_time','32')->default('');
            $table->text('finish_msg')->nullable();
            $table->string('return_time','32')->default('');
            $table->text('return_msg')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('profit_sharing_list');
    }
}
